#include <bits/stdc++.h>

using namespace std;
void rightShift(int (&a)[9],int places)
{
    int len=sizeof(a)/sizeof(a[0]),temp;
    places%=len;
    for (int i=0;i<places ;++i )
    {
        temp=a[len-1];
        for (int j=len-1; j>0;--j )
        {
            a[j]=a[j-1];
        }
        a[0]=temp;
    }
}
int main_116()
{
    int arr[]={4,1,5,6,7,8,3,2,12};
    //12,4,1,5,6,7,8,3,2
    //2,12,4,1,5,6,7,8,3
    //3,2,12,4,1,5,6,7,8
    //8,3,2,12,4,1,5,6,7
    rightShift(arr,17);
    for (int k=0;k<9 ;++k )
    {
        printf("%d ",arr[k]);
    }
    //8 3 2 12 4 1 5 6 7
	return 0;
}
